﻿using UnityEngine;
using System.Collections;

public class DetectMouseEvent : MonoBehaviour {


	private UILabel info;
	void Start () {
	
		info=GameObject.FindWithTag("information_label").GetComponent<UILabel>();
	}
	

	void Update () {
		if(Input.GetMouseButtonDown(0)){
			Vector3 v=new Vector3(Input.mousePosition.x,Input.mousePosition.y,Input.mousePosition.z);
			info.text="camera detected :"+"x = "+v.x+" ;y = "+v.y+" ;z = "+v.z;
			GameObject.FindGameObjectWithTag("SK_Primate");
			Instantiate(Resources.Load("sk_prefab"),v,Quaternion.identity);
		}
	}
}
